﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.Master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="ArchitectSite.Admin.Article.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Scripts/lib/jBreadcrumbs/css/BreadCrumb.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/lib/jBreadcrumbs/jquery.jBreadCrumb.1.1.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
 <nav>
        <div id="jCrumbs" class="breadCrumb module">
            <ul>
                <li>
                    <a href="#"><i class="icon-home"></i></a>
                </li>
                <li>
                    <a href="#">Article</a>
                </li>
                <li>
                    <a href="#">List Article</a>
                </li>
            </ul>
        </div>
    </nav>
    <div class="row-fluid">
        <div class="span12">
       <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>      --%>          
             <data:GridViewSearchPanel ID="GridViewSearchPanel1"  runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		        <br />
                <button class="btn btn-gebo" onclick="window.location.href='CreateArticle.aspx';">Tạo mới chủ đề</button>
                <br />
                <br />
		        <data:EntityGridView ID="GridView1" runat="server" CssClass="table table-striped table-bordered table-condensed" 			
				        AutoGenerateColumns="False"					
				        OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 
                        AllowPaging="true"
				        DataSourceID="ArticleDataSource"
				        DataKeyNames="Id"
				        AllowMultiColumnSorting="false"
				        DefaultSortColumnName="" AllowExportToExcel="false" 
                PagerStyle-CssClass="pager"  PageSize="20"   
				        DefaultSortDirection="Ascending" onrowdeleted="GridView1_RowDeleted" 
                onrowdeleting="GridView1_RowDeleting">                
			        <Columns>				       		
				        <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="[ID]" ReadOnly="True" />
				        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="[Title]"  />
				        <asp:BoundField DataField="Alias" HeaderText="Alias" SortExpression="[Alias]"  />				       
				        <asp:BoundField DataField="OrderIndex" HeaderText="Order Index" SortExpression="[OrderIndex]"  />
				        <asp:BoundField DataField="PublishedDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Published Date" SortExpression="[PublishedDate]"  />
				        <asp:BoundField DataField="CreatedDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Created Date" SortExpression="[CreatedDate]"  />
				        <asp:CheckBoxField DataField="IsHot" HeaderText="Is Hot" SortExpression="[IsHot]"  />
                        <asp:CheckBoxField DataField="IsPublished" HeaderText="Is Published" SortExpression="[IsPublished]"  />
                        <asp:CommandField ShowDeleteButton="true" ShowSelectButton="True"  SelectText="Edit"  />
			        </Columns>
			        <EmptyDataTemplate>
				        <b>No Article Found!</b>
			        </EmptyDataTemplate>
		      </data:EntityGridView> 
              <data:ArticleDataSource ID="ArticleDataSource" runat="server"
			        SelectMethod="GetPaged"
			        EnablePaging="True"
			        EnableSorting="True"
		        >
			        <Parameters>
				        <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				        <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				        <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				        <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				        <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			        </Parameters>
		    </data:ArticleDataSource>     
       <%--     </ContentTemplate>
        </asp:UpdatePanel>--%>		
        </div>
    </div>
        
    
</asp:Content>

